package com.ayq.activiti.manager.domain.workflow.service;


import com.ayq.activiti.manager.dto.*;
import com.ayq.activiti.manager.vo.ActivitiNodeInfoVO;
import com.ayq.activiti.manager.vo.ApprovalecordVO;
import com.ayq.activiti.manager.vo.WorkFlowApplyListVO;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @Author tangsy
 * @Date 2021/3/31 14:56
 */
public interface WorkFlowService {

    /**
     * <p>启动流程</p>
     * <p>方法名:startWorkFlow</p>
     * @Author ayq
     * @Date 2021/3/31 15:05
     * @Param [startWorkFlowDTO]
     * @Return void
     */
    void startWorkFlow(StartWorkFlowDTO startWorkFlowDTO) throws RuntimeException;

    /**
     *
     * <p>获取用户审核列表</p>
     * <p>方法名:getUserTaskList</p>
     * @Author ayq
     * @Date 2021/4/1 10:48
     * @Param [userTaskListDTO]
     * @Return org.ezca.esign.service.activiti.web.dto.WorkFlowApplyListDTO
     */
    List<WorkFlowApplyListVO> getUserTaskList(UserTaskListDTO userTaskListDTO) throws RuntimeException;


    /**
     *
     * <p>获取用户申请列表</p>
     * <p>方法名:getUserApplyList</p>
     * @Author ayq
     * @Date 2021/4/6 13:45
     * @Param [userApplyListDTO]
     * @Return java.util.List<org.ezca.esign.interfaces.api.activiti.dto.WorkFlowApplyListDTO>
     */
    List<WorkFlowApplyListVO> getUserApplyList(UserApplyListDTO userApplyListDTO) throws RuntimeException;

    /**
     *
     * <p>同意审批流程</p>
     * <p>方法名:agreeApprovalProcess</p>
     * @Author ayq
     * @Date 2021/4/1 15:16
     * @Param [workFlowOpinionDTO]
     * @Return org.ezca.esign.service.activiti.web.dto.WorkFlowApplyListDTO
     */
    WorkFlowApplyListVO agreeApprovalProcess(WorkFlowOpinionDTO workFlowOpinionDTO) throws RuntimeException;

    /**
     *
     * <p>拒绝审批流程</p>
     * <p>方法名:refuseApprovalProcess</p>
     * @Author ayq
     * @Date 2021/4/2 11:10
     * @Param [workFlowOpinionDTO]
     * @Return void
     */
    void refuseApprovalProcess(WorkFlowOpinionDTO workFlowOpinionDTO) throws RuntimeException;

    /**
     *
     * <p>获取业务历史审核意见</p>
     * <p>方法名:getTaskOpinionList</p>
     * @Author ayq
     * @Date 2021/4/6 15:46
     * @Param [workFlowOpinionDTO]
     * @Return org.ezca.esign.common.base.Ret<java.util.List<org.ezca.esign.interfaces.api.activiti.dto.ApprovalecordDTO>>
     */
    List<ApprovalecordVO> getTaskOpinionList(WorkFlowOpinionDTO workFlowOpinionDTO) throws RuntimeException;

    /**
     *
     * <p>根据任务ID获取业务历史审核意见</p>
     * <p>方法名:getTaskOpinionToTaskId</p>
     * @Author ayq
     * @Date 2021/4/19 11:12
     * @Param [taskId businessKey]
     * @Return org.ezca.esign.interfaces.api.activiti.vo.ApprovalecordVO
     */
    ApprovalecordVO getTaskOpinionToTaskId(String taskId, String businessKey) throws RuntimeException;

    /**
     *
     * <p>校验是否有流程在运行中</p>
     * <p>方法名:checkActivitiEnd</p>
     * @Author ayq
     * @Date 2021/4/8 17:11
     * @Param [checkActivitiEndDTO]
     * @Return org.ezca.esign.interfaces.api.activiti.dto.CheckActivitiEndDTO
     */
    CheckActivitiEndDTO checkActivitiEnd(CheckActivitiEndDTO checkActivitiEndDTO) throws RuntimeException;

    /**
     *
     * <p>获取活动节点信息</p>
     * <p>方法名:getNodeInfo</p>
     * @Author ayq
     * @Date 2021/4/16 14:16
     * @Param [nodeInfoDTO]
     * @Return org.ezca.esign.interfaces.api.activiti.vo.ActivitiNodeInfoVO
     */
    ActivitiNodeInfoVO getNodeInfo(NodeInfoDTO nodeInfoDTO) throws RuntimeException;

    /**
     *
     * <p>根据实例ID查看流程图</p>
     * <p>方法名:getProcessInstanceIdBpmnImgs</p>
     * @Author ayq
     * @Date 2021/4/16 15:17
     * @Param [processInstanceId, resp]
     * @Return void
     */
    void getProcessInstanceIdBpmnImgs(String processInstanceId, HttpServletResponse resp) throws Exception;
    
}
